package com.wukaige.order.feign;

import com.wukaige.order.entity.Goods;
import com.wukaige.order.hystrix.GoodfeignBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Component
@FeignClient(name = "cloud-goods",fallback = GoodfeignBack.class)
public interface GoodsFeign {

    @GetMapping("/goods/getgoodsbygid")
    public Goods getgoodsbygid(@RequestParam(value = "gid") Integer gid);

    @RequestMapping("/goods/updatebygid")
    public boolean updatebygid(@RequestParam(value = "gid") Integer gid, @RequestParam(value = "goodsum") Integer goodsum,@RequestParam(value = "invent")Integer invent);


}
